﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:Micro="using:Caliburn.Micro">
    <Style x:Key="PageHeaderImageStyle" TargetType="Image">
        <Setter Property="VerticalAlignment" Value="Bottom" />
        <Setter Property="Margin" Value="0,0,0,0" />
        <Setter Property="HorizontalAlignment" Value="Left" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="Stretch" Value="None" />
    </Style>
    <Style x:Key="SnappedPageImageStyle" TargetType="Image">
        <Setter Property="VerticalAlignment" Value="Bottom" />
        <Setter Property="HorizontalAlignment" Value="Left" />
        <Setter Property="Stretch" Value="None" />
        <Setter Property="Margin" Value="0,0,0,30" />
    </Style>
    <Style x:Key="SettingsBackButtonStyle" TargetType="Button">
        <Setter Property="MinWidth" Value="0" />
        <Setter Property="FontFamily" Value="Segoe UI Symbol" />
        <Setter Property="FontWeight" Value="Normal" />
        <Setter Property="FontSize" Value="26.66667" />
        <Setter Property="AutomationProperties.AutomationId" Value="BackButton" />
        <Setter Property="AutomationProperties.Name" Value="Back" />
        <Setter Property="AutomationProperties.ItemType" Value="Navigation Button" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Grid x:Name="RootGrid"
                          Width="30"
                          Height="30">

                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="PointerOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGlyph" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource NewBackButtonBackgroundThemeBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NormalGlyph" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource BackButtonPointerOverForegroundThemeBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGlyph" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource NewBackButtonForegroundThemeBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation Duration="0"
                                                         Storyboard.TargetName="ArrowGlyph"
                                                         Storyboard.TargetProperty="Opacity"
                                                         To="1" />
                                        <DoubleAnimation Duration="0"
                                                         Storyboard.TargetName="NormalGlyph"
                                                         Storyboard.TargetProperty="Opacity"
                                                         To="0" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RootGrid" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0"
                                                         Storyboard.TargetName="FocusVisualWhite"
                                                         Storyboard.TargetProperty="Opacity"
                                                         To="1" />
                                        <DoubleAnimation Duration="0"
                                                         Storyboard.TargetName="FocusVisualBlack"
                                                         Storyboard.TargetProperty="Opacity"
                                                         To="1" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unfocused" />
                                <VisualState x:Name="PointerFocused" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid Margin="-6,-6,0,0">
                            <TextBlock x:Name="BackgroundGlyph"
                                       Foreground="{StaticResource BackButtonBackgroundThemeBrush}"
                                       Text="" />
                            <TextBlock x:Name="NormalGlyph"
                                       Foreground="{StaticResource NewBackButtonForegroundThemeBrush}"
                                       Text="{StaticResource BackButtonSnappedGlyph}" />
                            <TextBlock x:Name="ArrowGlyph"
                                       Foreground="{StaticResource BackButtonPressedForegroundThemeBrush}"
                                       Opacity="0"
                                       Text="" />
                        </Grid>
                        <Rectangle x:Name="FocusVisualWhite"
                                   IsHitTestVisible="False"
                                   Opacity="0"
                                   Stroke="{StaticResource FocusVisualWhiteStrokeThemeBrush}"
                                   StrokeDashArray="1,1"
                                   StrokeDashOffset="1.5"
                                   StrokeEndLineCap="Square" />
                        <Rectangle x:Name="FocusVisualBlack"
                                   IsHitTestVisible="False"
                                   Opacity="0"
                                   Stroke="{StaticResource FocusVisualBlackStrokeThemeBrush}"
                                   StrokeDashArray="1,1"
                                   StrokeDashOffset="0.5"
                                   StrokeEndLineCap="Square" />

                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <DataTemplate x:Key="SanpDataTemplate">
        <StackPanel Orientation="Vertical">
            <StackPanel Margin="0,0,0,10" Orientation="Horizontal">
                <TextBlock FontSize="24"
                           Foreground="{StaticResource AboutColorBrush}"
                           Style="{StaticResource GroupHeaderTextStyle}"
                           Text="{Binding GroupName}" />
                <TextBlock Margin="10,0,0,10"
                           Foreground="{StaticResource AboutColorBrush}"
                           Style="{StaticResource GroupHeaderTextStyle}"
                           Text="&gt;" />
            </StackPanel>
            <Grid Width="300"
                  Height="300"
                  Margin="0,0,0,10">
                <Image Source="{Binding SubImageUrlOne}" Stretch="UniformToFill" />
                <Border HorizontalAlignment="Left"
                        VerticalAlignment="Bottom"
                        Background="{StaticResource PriceBackgroundBrush}">
                    <TextBlock Margin="5,0,5,0"
                               HorizontalAlignment="Left"
                               FontFamily="Arial"
                               FontSize="15"
                               Foreground="{StaticResource CommonWhiteBrush}"
                               Text="{Binding Price1}" />
                </Border>
            </Grid>

            <Grid Width="300"
                  Height="300"
                  Margin="0,0,0,10">
                <Image Source="{Binding SubImageUrlTwo}" Stretch="UniformToFill" />
                <Border HorizontalAlignment="Left"
                        VerticalAlignment="Bottom"
                        Background="{StaticResource PriceBackgroundBrush}">
                    <TextBlock Margin="5,0,5,0"
                               HorizontalAlignment="Left"
                               FontFamily="Arial"
                               FontSize="15"
                               Foreground="{StaticResource CommonWhiteBrush}"
                               Text="{Binding Price2}" />
                </Border>
            </Grid>
        </StackPanel>
    </DataTemplate>
    <DataTemplate x:Key="GrouopHeaderDataTemplate">
        <Grid Margin="1,0,0,6">
            <Button AutomationProperties.Name="Group Title"
                    Micro:Message.Attach="[Event Click]=[Action ItemTitleClick($dataContext)]"
                    Style="{StaticResource TextPrimaryButtonStyle}">
                <StackPanel Orientation="Horizontal">
                    <TextBlock Margin="3,0,10,10"
                               Style="{StaticResource GroupHeaderTextStyle}"
                               Text="{Binding Key.GroupName}" />
                    <TextBlock Margin="0,0,0,10"
                               Style="{StaticResource GroupHeaderTextStyle}"
                               Text="&gt;" />
                </StackPanel>
            </Button>
        </Grid>
    </DataTemplate>


</ResourceDictionary>
